package com.design03_behavioral.pattern22_interpreter.example02;

/**
 * @ClassName 乘法运算
 * @Description TODO
 * @Author 22963
 * @DATE 2023/9/11 0:30
 */
public class MulExpression  implements Expression{

    private Expression exp1;

    private Expression exp2;

    public MulExpression(Expression exp1, Expression exp2) {
        this.exp1 = exp1;
        this.exp2 = exp2;
    }


    @Override
    public long interpret() {
        return exp1.interpret() * exp2.interpret();
    }

}
